<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>我的联盟</title>
		<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0' />
		<link rel="stylesheet" href="css/myTeam.css" />
		<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="js/moduls/islogin.js"></script>
		<script src="js/moduls/alliance.js" type="text/javascript" charset="utf-8"></script>
		<script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script src="//res.qiaomukeji.com/js/chomoo-weixin.js?v=3"></script>
		<script type="text/javascript" src="js/qrcode.min.js"></script>
		<script type="text/javascript" src="js/adapter.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

	</head>

	<body>
		<div class="content" style="opacity: 0;">
			<div class="logo">
				<img src="img/logo.png" />
			</div>
			<div class="theme">
				<img src="img/theme.png" />
			</div>
			<div class="subTop">
				<div class="picture">
					<img src="img/title2.png" />
				</div>
				<div class="right_items">
					<div class="exit">退出联盟</div>
					<div class="myLotus">我的荷花</div>
				</div>
			</div>

			<div class="middlePath">
				<div class="title" style="font-size: 0.34rem; color: #fff; font-weight: 800;font-family: '微软雅黑';">
					<span>
      		{{teamInfos.name}}
      	</span>

					<!--<img src="img/myAlliance.png" alt="">-->
				</div>
				<div class="midContent">
					<div class="innerContent">
						<ul class="ownerInfos clearFixed">
							<!---->
							<li>{{teamInfos.honor}}荣誉值</li>
							<li>排名：{{teamInfos.rownum}}</li>
							<li>地区：{{teamInfos.address}}</li>

						</ul>
						<ul class="ownerInfos clearFixed">

							<li>
								<div style="width: 0.4rem;height:0.4rem;line-height:0.4rem;vertical-align: middle;display: inline-block;margin-top: -0.09rem;"><img :src="captain.avatar" style="border-radius: 50%;vertical-align: top;" /></div>
								{{myInfo.name}}</li>
							<li>{{myInfo.lotusNum}}荷花</li>
							<!--<li>联盟 {{captain.rowNum}} 名</li>-->
						</ul>
						<div class="alliance">
							<div class="scan">扫一扫</div>
							<div class="inviteBtn">邀请联盟</div>
							<div class="knowledge">知识PK</div>
						</div>
						<div>
							<span style="display: inline-block; color: #fff; vertical-align: middle;">队长</span>
							<ul class="captain" style="display: inline-block; vertical-align: middle;">
								<!--<li>{{teamUsers[0].src}}</li>-->
								<li class="pic" style="width: 0.46rem;margin:0 0.1rem;"><img :src="captain.avatar" style="border-radius: 50%;" /></li>
								<li style="width: 1.2rem; overflow: hidden;">{{captain.name}}</li>
								<li style="width: 1.3rem; overflow: hidden;">{{captain.lotusNum}}荷花</li>
								<!--<li class="pic"><img src="img/touxiang.png" alt=""></li>
								<li>昵称</li>
								<li>**荷花</li>-->
							</ul>

						</div>
						<div class="line">
							<img src="img/team_line.png" alt="">
						</div>

						<div class="innerMen">
							<span>队员</span>
							<ul class="members" v-for="(member,index) in teamUsers" :key="index">

								<li>{{index+1}}</li>
								<li class="pic" style="width: 0.4rem;"><img :src="member.avatar" style="border-radius: 50%;" /></li>
								<!--<li>{{member.avatar}}</li>-->
								<li style="width: 1.2rem; overflow: hidden;">{{member.name}}</li>
								<li style="width: 1.3rem; overflow: hidden;text-align: left;">{{member.lotusNum}}荷花</li>
							</ul>
						</div>
						<div class="line">
							<img src="img/team_line.png" alt="">
						</div>
						<div class="page">
							<!--<span>页码</span>
							<span>1</span>
							<span>2</span>
							<span>3</span>
							<span>4</span>
							<span>5</span>
							<span>6</span>-->
						</div>

					</div>
				</div>

			</div>

			<div class="backBtn">
				<a href="javascript:history.go(-1)">返回</a>
			</div>
			<div class="bottom-logo">
				<img src="img/bottom_logo2.png" />
			</div>

			<!-- 邀请弹框 -->

			<div class="invite">
				<div class="arrow">
					<img src="img/arrow.png" alt="">
				</div>
				<div class="tipTxt">邀请好友加入联盟</div>
				<div class="tipBox">
					<div class="close"><img src="img/closeBox.png" alt=""></div>
					<div class="innerBox">
						<!--<div class="subLogo"><img src="img/logo.png" alt=""></div>-->
						<div class="teamInfo">
							<div class="name">联盟名称：{{teamInfos.name}}</div>
							<div class="member">成员：{{teamUsers.length}}个</div>
							<div class="certain">荣誉值：{{teamInfos.honor}}分</div>
						</div>
						<div class="scanImg"><img id="codeImg" src="" /></div>

					</div>
				</div>
			</div>
		</div>

		<div id="QRCodeNone" style="width:160px;height:160px;position: absolute;top: 0;left:0;display:none;"></div>
	</body>
	<script type="text/javascript">
		var app = new Vue({
			el: '.content',
			data: {
				myInfo:[],
				teamUsers: [],
				teamInfos: [],
				captain: {}
			}
		})

		//		var t_mine = {};
		var t_inviteUrl;
		//获取联盟
		getMyTeam(t_skey, function(_res) {
			app.teamUsers = _res.teamUsers;
			app.teamInfos = _res.teamInfo;

			for(var j = 0; j < _res.teamUsers.length; j++) {
				if(_res.teamUsers[j]["uid"] == window.localStorage.getItem("uid")) {
					app.myInfo = _res.teamUsers[j];
				}
				if(_res.teamUsers[j]["uid"] == _res.teamInfo["captain"]) {
					app.captain = _res.teamUsers[j];
					app.teamUsers.splice(j, 1);
				}
			}

			$(".content").css("opacity", 1);
			t_inviteUrl = "https://hehua.ai-zuoye.cn/project/?proId=lotusTeam&teamId=" + app.teamInfos["id"] + "&uid=" + window.localStorage.getItem("uid");
		})
	</script>
	<script src="js/myTeam.js" type="text/javascript" charset="utf-8"></script>

</html>